package io.litchi.auth.domain.entity.auth;

import io.litchi.common.base.BaseEntity;
import jakarta.persistence.*;
import lombok.*;
import lombok.experimental.FieldDefaults;
import org.hibernate.annotations.Comment;

/**
 * description: 角色菜单权限表
 *
 * @author helang
 * @since 2025-09-18
 */
@Entity
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@EqualsAndHashCode(of = "id", callSuper = false)
@Table(name = "role_menu_perm")
@Comment("角色权限菜单中间表")
public class RoleMenuPerm extends BaseEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false, unique = true,
            columnDefinition = "BIGINT(20) COMMENT 'id'")
    Long id;

    @Column(name = "role_id",nullable = false, columnDefinition = "BIGINT(20) COMMENT '角色id'")
    Long roleId;

    @Column(name = "menu_perm_id",nullable = false,columnDefinition = "BIGINT(20) COMMENT '菜单权限id'")
    Long menuPermId;

}